package com.suneee.store.dao;

import java.util.List;
import java.util.Map;

import com.suneee.context.page.Page;
import com.suneee.orm.Dao;
import com.suneee.store.bean.ProductDTO;
import com.suneee.store.entity.ShopStock;

public interface ShopStockDao extends Dao<ShopStock, Integer> {


	/**
	 * 通过店铺库存id及企业编号获得单个对象
	 * @param stockId
	 * @param enterpriseCode
	 * @return
	 */
	public ShopStock selectByIdEnterpriseCode(Integer stockId,String enterpriseCode);
	
	/**
	 * 通过skuId及企业编号获得单个对象
	 * @param skuId skuId
	 * @param enterpriseCode 企业编号
	 * @return
	 */
	public ShopStock selectBySkuIdEnterpriseCode(Integer skuId,String enterpriseCode);
	
	/**
	 * 获得商品的出库详细
	 * @param skuId
	 * @return
	 */
	public List<ShopStock> getListBySkuId(Integer skuId, String enterpriseCode);
	
	/**
	 * 根据SPU,SKU,ShopId获取店铺仓商品信息
	 * @param spuId
	 * @param skuId
	 * @param enterpriseCode
	 * @return
	 */
	public ShopStock getListBySkuSpu(Integer spuId,Integer skuId, String enterpriseCode,Integer shopId);
	
	/**
	 * 根据skuId,enterpriseCode,shopId获取店铺库存记录
	 * @param skuId
	 * @param enterpriseCode
	 * @param shopId
	 * @return
	 */
	public ShopStock getByShopIdSkuIdEpCode(Integer skuId,String enterpriseCode,Integer shopId);
	
	
	public Page<Map<String, Object>> mapView(ProductDTO dto);
	
}
